<div class="clearfix">
	<div id="visiblePlayers" class="floatLeft">
		<b>Visible Players</b>
		<table class="dataTable">
			<thead>
				<tr>
					<td class="columnLabel" style="width: 75%;">
						Gamer Tag
					</td>
					<td class="columnLabel">
						Actions
					</td>
				</tr>
			</thead>
			<% row_index = 0 -%>
			<% @watched_players.each do |watched_player| -%>
			<% if ( watched_player['visible'].to_s == '1' ) -%>
			<tr <%= 'class="rowA"' if ( (row_index % 2) == 1 ) -%>>
				<td style="width: 75%;">
					<%= watched_player['player_name'] %>
				</td>
				<td>
					<a class="sortButton" onclick="new Ajax.Updater('watchedPlayers', '/stats/set_watched_player_visibility?gamer_tag=<%= watched_player['player_name'] %>&active=0', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Hide</a>
				</td>
			</tr>
			<% row_index = row_index + 1 -%>
			<% end -%>
			<% end -%>
		</table>
	
	</div>
	
	<div id="hiddenPlayers" class="floatLeft">
		<b>Hidden Players</b>
		<table class="dataTable">
			<thead>
				<tr>
					<td class="columnLabel" style="width: 75%;">
						Gamer Tag
					</td>
					<td class="columnLabel">
						Actions
					</td>
				</tr>
			</thead>
			<% row_index = 0 -%>
			<% @watched_players.each do |watched_player| -%>
			<% if ( watched_player['visible'].to_s != '1' ) -%>
			<tr <%= 'class="rowA"' if ( (row_index % 2) == 1 ) -%>>
				<td style="width: 75%;">
					<%= watched_player['player_name'] %>
				</td>
				<td>
					<a class="sortButton" onclick="new Ajax.Updater('watchedPlayers', '/stats/set_watched_player_visibility?gamer_tag=<%= watched_player['player_name'] %>&active=1', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Show</a>
				</td>
			</tr>
			<% row_index = row_index + 1 -%>
			<% end -%>
			<% end -%>
		</table>
	</div>
</div>